Set

Function

This API is used to set parameter for AI > Setup > Multi-Target-Type Recognition page.

Request Message

See AI > Setup > Multi-Target-Type Recognition > Range > Parameter Description > Table 2for parameter description.

Sample:

POST /API/AI/Setup/PVD/Set
HTTP/1.1
{
    "version": "1.0",
    "data": {
        "channel_info": {"CH1": {
            "mix_rule": true,
            "sensitivity": 60,
            "snap_mode": "Default",
            "max_pixel": 640,
            "min_pixel": 64,
            "detection_mode": "HybridMode",
            "detection_type_ex": [
                "Person",
                "Bicycle",
                "Baseball Glove",
                "Bottle",
                "Chair",
                "Toaster",
                "Vase",
                "Scissors",
                "Toothbrush"
            ],
            "rule_draw_number": "rule_number1",
            "rule_info": {
                "rule_number1": {
                    "rule_switch": true,
                    "detection_type_ex": [
                        "Person",
                        "Bicycle",
                        "Airplane",
                        "Truck",
                        "Orange",
                        "Toothbrush",
                        "Train",
                        "Bear"
                    ],
                    "sensitivity": 54,
                    "detection_mode": "HybridMode",
                    "point_num": [
                        3,
                        8
                    ],
                    "detection_range": "UserDefined",
                    "rule_rect": {
                        "x1": 10,
                        "y1": 144,
                        "x2": 90,
                        "y2": 10,
                        "x3": 262,
                        "y3": 10,
                        "x4": 342,
                        "y4": 144,
                        "x5": 262,
                        "y5": 278,
                        "x6": 90,
                        "y6": 278,
                        "x7": 90,
                        "y7": 278,
                        "x8": 90,
                        "y8": 278
                    },
                    "rule_number": "rule_number1",
                    "Select": 1
                },
                "rule_number2": {
                    "rule_switch": true,
                    "detection_type_ex": [
                        "Person",
                        "Bicycle",
                        "Motorcycle",
                        "Bus"
                    ],
                    "sensitivity": 60,
                    "detection_mode": "HybridMode",
                    "point_num": [
                        3,
                        8
                    ],
                    "detection_range": "UserDefined",
                    "rule_rect": {
                        "x1": 362,
                        "y1": 144,
                        "x2": 442,
                        "y2": 10,
                        "x3": 614,
                        "y3": 10,
                        "x4": 694,
                        "y4": 144,
                        "x5": 614,
                        "y5": 278,
                        "x6": 442,
                        "y6": 278,
                        "x7": 442,
                        "y7": 278,
                        "x8": 442,
                        "y8": 278
                    },
                    "Select": 0
                },
                "rule_number3": {
                    "rule_switch": false,
                    "detection_type_ex": [
                        "Person",
                        "Bicycle"
                    ],
                    "sensitivity": 60,
                    "detection_mode": "HybridMode",
                    "point_num": [
                        3,
                        8
                    ],
                    "detection_range": "UserDefined",
                    "rule_rect": {
                        "x1": 0,
                        "y1": 0,
                        "x2": 0,
                        "y2": 0,
                        "x3": 0,
                        "y3": 0,
                        "x4": 0,
                        "y4": 0,
                        "x5": 0,
                        "y5": 0,
                        "x6": 0,
                        "y6": 0,
                        "x7": 0,
                        "y7": 0,
                        "x8": 0,
                        "y8": 0
                    },
                    "Select": 0
                },
                "rule_number4": {
                    "rule_switch": false,
                    "detection_type_ex": [
                        "Person",
                        "Bicycle"
                    ],
                    "sensitivity": 60,
                    "detection_mode": "HybridMode",
                    "point_num": [
                        3,
                        8
                    ],
                    "detection_range": "UserDefined",
                    "rule_rect": {
                        "x1": 0,
                        "y1": 0,
                        "x2": 0,
                        "y2": 0,
                        "x3": 0,
                        "y3": 0,
                        "x4": 0,
                        "y4": 0,
                        "x5": 0,
                        "y5": 0,
                        "x6": 0,
                        "y6": 0,
                        "x7": 0,
                        "y7": 0,
                        "x8": 0,
                        "y8": 0
                    },
                    "Select": 0
                }
            },
            "draw_add_btn": {
                "visible": true,
                "rule_rect": [
                    {
                        "x1": 10,
                        "y1": 144,
                        "x2": 90,
                        "y2": 10,
                        "x3": 262,
                        "y3": 10,
                        "x4": 342,
                        "y4": 144,
                        "x5": 262,
                        "y5": 278,
                        "x6": 90,
                        "y6": 278,
                        "x7": 90,
                        "y7": 278,
                        "x8": 90,
                        "y8": 278
                    },
                    {
                        "x1": 362,
                        "y1": 144,
                        "x2": 442,
                        "y2": 10,
                        "x3": 614,
                        "y3": 10,
                        "x4": 694,
                        "y4": 144,
                        "x5": 614,
                        "y5": 278,
                        "x6": 442,
                        "y6": 278,
                        "x7": 442,
                        "y7": 278,
                        "x8": 442,
                        "y8": 278
                    },
                    {
                        "x1": 10,
                        "y1": 430,
                        "x2": 90,
                        "y2": 296,
                        "x3": 262,
                        "y3": 296,
                        "x4": 342,
                        "y4": 430,
                        "x5": 262,
                        "y5": 564,
                        "x6": 90,
                        "y6": 564,
                        "x7": 90,
                        "y7": 564,
                        "x8": 90,
                        "y8": 564
                    },
                    {
                        "x1": 362,
                        "y1": 430,
                        "x2": 442,
                        "y2": 296,
                        "x3": 614,
                        "y3": 296,
                        "x4": 694,
                        "y4": 430,
                        "x5": 614,
                        "y5": 564,
                        "x6": 442,
                        "y6": 564,
                        "x7": 442,
                        "y7": 564,
                        "x8": 442,
                        "y8": 564
                    }
                ]
            },
            "mutual_exclusion": ["SMD"],
            "chn_index": "CH1",
            "page": "chn_pd",
            "curPage": "smart_setting",
            "rule_number_list": [
                "rule_number1",
                "rule_number2",
                "rule_number3",
                "rule_number4"
            ],
            "rule_number_sel": "rule_number1",
            "isAiPage": true,
            "rule": {
                "rule_switch": true,
                "detection_type_ex": [
                    "Person",
                    "Bicycle",
                    "Airplane",
                    "Truck",
                    "Orange",
                    "Toothbrush",
                    "Train",
                    "Bear"
                ],
                "sensitivity": 54,
                "detection_mode": "HybridMode",
                "point_num": [
                    3,
                    8
                ],
                "detection_range": "UserDefined",
                "rule_rect": {
                    "x1": 10,
                    "y1": 144,
                    "x2": 90,
                    "y2": 10,
                    "x3": 262,
                    "y3": 10,
                    "x4": 342,
                    "y4": 144,
                    "x5": 262,
                    "y5": 278,
                    "x6": 90,
                    "y6": 278,
                    "x7": 90,
                    "y7": 278,
                    "x8": 90,
                    "y8": 278
                },
                "rule_number": "rule_number1",
                "Select": 1
            },
            "detection_range": "UserDefined",
            "pixelRect": {
                "minPixelRectMin": 64,
                "minPixelRectMax": 1080,
                "minPixelRectColor": "rgb(0,255,0)",
                "minPixelPointX": 40,
                "minPixelPointY": 40,
                "maxPixelRectMin": 320,
                "maxPixelRectMax": 1080,
                "maxPixelRectColor": "rgb(0,255,0)",
                "maxPixelPointX": 20,
                "maxPixelPointY": 20,
                "pixelRectScaleWidth": 1920,
                "pixelRectScaleHeight": 1080
            }
        }},
        "channel": "CH1",
        "ability": "MultiTypeRecognition"
    }
}

Response Message

none.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result":"success",
    "data":{}
}

Error Code

See Response Messages Body and Common error_code for more information.